<form action="<?php echo KAMAR ?>edit_kamar_process">
    <input name="id" type="hidden" value="<?php echo $id ?>" />
<h3 class="center">EDIT KAMAR</h3>
	<table class="tabelket" width="600px">
	<tr>
		<td class="right" width="50%">Nama kamar:</td>
		<td class="left" width="50%"><input name="nama" class="panjang" value="<?php echo $nama?>" /></td>
	</tr>
	<tr>
		<td class="right">Status huni:</td>
		<td class="left"><select name="status_huni">
        <option <?php if($status_huni=="available") echo "selected"?>>available</option>
        <option <?php if($status_huni=="confirmed") echo "selected"?>>confirmed</option>
        <option <?php if($status_huni=="checked") echo "selected"?>>checked</option>
        <option <?php if($status_huni=="unconfirmed") echo "selected"?>>unconfirmed</option>
        <option <?php if($status_huni=="dibersihkan") echo "selected"?>>dibersihkan</option>
        <option <?php if($status_huni=="rusak") echo "selected"?>>rusak</option>
        <option <?php if($status_huni=="direnovasi") echo "selected"?>>direnovasi</option>
    </select></td>
	</tr>
	<tr>
		<td class="right">Tipe letak kamar:</td>
		<td class="left"><select name="tipe_letak_kamar">
        <option <?php if($tipe_letak_kamar=="bungalow") echo "selected"?>>bungalow</option>
        <option <?php if($tipe_letak_kamar=="lantai") echo "selected"?>>lantai</option>
    </select></td>
	</tr>
	<tr>
		<td class="right">Nomor letak kamar:</td>
		<td class="left"><input name="no_letak_kamar" class="panjang" value="<?php echo $no_letak_kamar?>"/></td>
	</tr>
	<tr>
		<td class="right">Nomor kamar:</td>
		<td class="left"><input name="no_kamar" class="panjang" value="<?php echo $no_kamar?>"/></td>
	</tr>
	<tr>
		<td class="right">Kategori:</td>
		<td class="left"><select name='id_kategori_kamar'>
        <?php
        for($i=0;$i<count($kategori_kamar);$i++)
        {
            ?>
        <option value="<?php echo $kategori_kamar[$i]['id'] ?>" <?php 
            if($kategori_kamar[$i]['id']==$id_kategori_kamar) echo "selected"
        ?>>
            <?php echo $kategori_kamar[$i]['nama'] ?></option>
        <?php
        }
        ?>
    </select></td>
	</tr>
	<tr>
		<td class="right">Adjoining room dengan:</td>
		<td class="left">
			<?php for($i=0;$i<count($kamar);$i++) {
        if($kamar[$i]['id']==$id)
	          continue;
	        ?>
	    <input type="checkbox" name="adjoining[]" value="<?php echo $kamar[$i]['id'] ?>" <?php if(in_array(array('id_room1'=>$kamar[$i]['id'],'id_room2'=>$id),$kamar_adjoining) || in_array(array('id_room1'=>$id,'id_room2'=>$kamar[$i]['id']),$kamar_adjoining)) echo "checked" ?> ><?php echo $kamar[$i]['nama'] ?></input><br />
	    <?php } ?>
		</td>
	</tr>
	<tr>
		<td class="right">&nbsp;</td>
		<td class="left"><input type="submit" value="Submit" class="tombol"></td>
	</tr>
	</table>
</form>